<?php
class userComponents extends sfComponents
{
  public function executeMenu()
  {
  }

  public function executeSecMenu()
  {
     if($this->getUser()->isAuthenticated())
     {
        $profil = DbFinder::from('Profil')->findPk($this->getUser()->getAttribute('id'));
        if($profil->getTip() == ProfilPeer::$tip['roditelj'])
        {
           $uceniks = UcenikPeer::getJoin()->where('Ucenik.RoditeljId', $profil->getId())->find();
           $this->uceniks = $uceniks;
        }
        $this->profil = $profil;
     }
  }
}